<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<script type="text/javascript">
	//初始化数据列表
	function initsq(url_){
		$('#sTable').datagrid({
			url:url_,
			loadMsg:'数据装载中......',
		    title:'结果列表',//标题
		    width:'auto',//列表的宽度
			height:'auto',//列表的高度
			fit:true,//自动填充全屏
			nowrap: false,//数据是否显示在一行中
			fitColumns:true,//是否根据字体数收缩
		    pagination:true,//分页底部显示
		    pageList:[10,20,50],//设置分页下拉页数
		    rownumbers : true,//显示行号
			singleSelect:true,//只能单选
			autoRowHeight:false,//自动行高
			idField : 'id',
		    columns:[[
				{field:'ck',checkbox:'true'},
				{field:'id',title:'id',width:fixWidth(10),align:'center',hidden:true},
				{field:'carNo',title:'车牌号',width:fixWidth(10),align:'center'},
				{field:'company',title:'所属企业',width:fixWidth(10),align:'center'},
				{field:'remark',title:'备注',width:fixWidth(10),align:'center'}
			]],
		});
	}
	
	//跳转到放行卡页面
	function allotDate(){
		var busRow = $('#sTable').datagrid('getSelected');//选中的班车行
		if(busRow == null || busRow.length<1){
			$.messager.alert('消息', "请最少选择一辆班车!",'info');	
		}else{
			window.location.href="${basePath}/bus/enterCard/edit.do?carNo="+busRow.carNo;
		}
	}
	
	//关闭弹出窗体
	function closeWindow(){
		$('#sw').window('close');
	}
</script>

	
		<!-- 弹出对话框 -->
		<div id="sw" class="easyui-window" style="width:700px;height:400px;padding:5px; background: #fafafa;" 
			data-options="modal:true,closed:true,iconCls:'icon-save',footer:'#sfooter'">
			<div class="easyui-layout" fit="true">
				<div region="center" border="false">
				    <table id="sTable" class="easyui-datagrid"  style="width:700px;height:260px">
					</table>
				</div>
			<div id="sfooter" style="text-align:right;padding: 0px 10px">
				<a href="javascript:void(0)" class="easyui-linkbutton" onclick="allotDate()"  data-options="iconCls:'icon-page_save',plain:true" >确定</a>
				<span class="search-btn-separator"></span>
				<a href="javascript:void(0)" class="easyui-linkbutton" onclick="closeWindow()" data-options="iconCls:'icon-cross',plain:true">返回</a>
			</div>
			</div>
		</div>
